﻿<Window x:Class="Glissando.SettingsDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Settings" SizeToContent="Height" Width="500" Background="Black">
    <Window.BindingGroup>
        <BindingGroup x:Name="BindingGroup1"/>
    </Window.BindingGroup>
    <DockPanel>
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="8">
            <Button Content="Ok" Click="OkButton_Click" Width="72" Height="20" Margin="0 0 8 0" IsDefault="True"/>
            <Button Content="Cancel" Click="CancelButton_Click" Width="72" Height="20" IsCancel="True"/>
        </StackPanel>
        <StackPanel Margin="8">
            <GroupBox Header="Jam info" Margin="4">
                <Grid Margin="4">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Label Content="Alias" Grid.Column="0" Grid.Row="0"/>
                    <TextBox Text="{Binding Alias}" Grid.Column="1" Grid.Row="0"/>
                    <Label Content="Location" Grid.Column="0" Grid.Row="1"/>
                    <TextBox Text="{Binding Location}" Grid.Column="1" Grid.Row="1"/>
                    <Label Content="Room" Grid.Column="0" Grid.Row="2"/>
                    <TextBox Text="{Binding JamRoom}" Grid.Column="1" Grid.Row="2"/>
                </Grid>
            </GroupBox>
            <GroupBox Header="MIDI devices" Margin="4">
                <Grid Margin="4">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Label Content="Piano" Grid.Column="0" Grid.Row="0"/>
                    <ComboBox ItemsSource="{Binding OutputDevices}" SelectedIndex="{Binding PianoOutputDeviceID}" Grid.Column="1" Grid.Row="0"/>
                    <Label Content="Other instruments" Grid.Column="0" Grid.Row="1"/>
                    <ComboBox ItemsSource="{Binding OutputDevices}" SelectedIndex="{Binding OutputDeviceID}" Grid.Column="1" Grid.Row="1"/>
                    <Label Content="Input" Grid.Column="0" Grid.Row="2"/>
                    <ComboBox ItemsSource="{Binding InputDevices}" SelectedIndex="{Binding InputDeviceID}" Grid.Column="1" Grid.Row="2"/>
                </Grid>
            </GroupBox>
            <GroupBox Header="Playback" Margin="4">
                <Grid Margin="4">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Label Content="Volume" Grid.Column="0" Grid.Row="0"/>
                    <TextBox Text="{Binding PlaybackVolume}" Width="40" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Grid.Column="1" Grid.Row="0"/>
                    <Label Content="Volume equalizer" Grid.Column="0" Grid.Row="1"/>
                    <TextBox Text="{Binding VolumeEqualizerFactor}" Width="40" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Grid.Column="1" Grid.Row="1"/>
                </Grid>
            </GroupBox>
            <GroupBox Header="Pitch/chord recognition test" Margin="4" DataContext="{Binding Settings}">
                <Grid Margin="4">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="8"/>
                        <RowDefinition/>
                        <RowDefinition Height="8"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>

                    <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="0">
                        <Label Content="Scales" Margin="0 0 0 8"/>
                        <CheckBox Content="C" IsChecked="{Binding TestC}"/>
                        <CheckBox Content="C# / Db" IsChecked="{Binding TestCsharp}"/>
                        <CheckBox Content="D" IsChecked="{Binding TestD}"/>
                        <CheckBox Content="D# / Eb" IsChecked="{Binding TestDsharp}"/>
                        <CheckBox Content="E" IsChecked="{Binding TestE}"/>
                        <CheckBox Content="F" IsChecked="{Binding TestF}"/>
                        <CheckBox Content="F# / Gb" IsChecked="{Binding TestFsharp}"/>
                        <CheckBox Content="G" IsChecked="{Binding TestG}"/>
                        <CheckBox Content="G# / Ab" IsChecked="{Binding TestGsharp}"/>
                        <CheckBox Content="A" IsChecked="{Binding TestA}"/>
                        <CheckBox Content="A# / Bb" IsChecked="{Binding TestAsharp}"/>
                        <CheckBox Content="B" IsChecked="{Binding TestB}"/>
                        <CheckBox Content="Major" IsChecked="{Binding TestMajorScales}" Margin="0 8 0 0"/>
                        <CheckBox Content="Minor" IsChecked="{Binding TestMinorScales}"/>
                        <CheckBox Content="Blues" IsChecked="{Binding TestBluesScales}"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="0">
                        <Label Content="Intervals" Margin="0 0 0 8"/>
                        <CheckBox Content="Single notes" IsChecked="{Binding TestSingleNotes}" Margin="0 0 0 8"/>
                        <CheckBox Content="Minor Second" IsChecked="{Binding TestMinorSecond}"/>
                        <CheckBox Content="Major Second" IsChecked="{Binding TestMajorSecond}"/>
                        <CheckBox Content="Minor Third" IsChecked="{Binding TestMinorThird}"/>
                        <CheckBox Content="Major Third" IsChecked="{Binding TestMajorThird}"/>
                        <CheckBox Content="Perfect Fourth" IsChecked="{Binding TestPerfectFourth}"/>
                        <CheckBox Content="Diminished Fifth" IsChecked="{Binding TestDiminishedFifth}"/>
                        <CheckBox Content="Perfect Fifth" IsChecked="{Binding TestPerfectFifth}"/>
                        <CheckBox Content="Minor Sixth" IsChecked="{Binding TestMinorSixth}"/>
                        <CheckBox Content="Major Sixth" IsChecked="{Binding TestMajorSixth}"/>
                        <CheckBox Content="Minor Seventh" IsChecked="{Binding TestMinorSeventh}"/>
                        <CheckBox Content="Major Seventh" IsChecked="{Binding TestMajorSeventh}"/>
                        <CheckBox Content="Perfect Octave" IsChecked="{Binding TestPerfectOctave}"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Grid.Column="2" Grid.Row="0">
                        <Label Content="Chords" Margin="0 0 0 8"/>
                        <CheckBox Content="Minor Triad" IsChecked="{Binding TestMinorTriad}"/>
                        <CheckBox Content="Major Triad" IsChecked="{Binding TestMajorTriad}"/>
                        <CheckBox Content="Augmented Triad" IsChecked="{Binding TestAugmentedTriad}"/>
                        <CheckBox Content="Diminished Triad" IsChecked="{Binding TestDiminishedTriad}"/>
                        <CheckBox Content="Diminished Seventh" IsChecked="{Binding TestDiminishedSeventh}"/>
                        <CheckBox Content="Minor Seventh" IsChecked="{Binding TestMinorSeventhChord}"/>
                    </StackPanel>

                    <Label Content="Octaves" Grid.Column="0" Grid.Row="2"/>
                    <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" >
                        <TextBox Text="{Binding TestMinOctave}" Width="40" HorizontalContentAlignment="Center"/>
                        <Label Content="to" Margin="8 0 8 0" VerticalAlignment="Center"/>
                        <TextBox Text="{Binding TestMaxOctave}" Width="40" HorizontalContentAlignment="Center"/>
                    </StackPanel>

                    <Label Content="Test time" Grid.Column="0" Grid.Row="4"/>
                    <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4" >
                        <TextBox Text="{Binding PitchTestTime}" Width="40" HorizontalContentAlignment="Right"/>
                        <Label Content="seconds" Margin="8 0 0 0" VerticalAlignment="Center"/>
                    </StackPanel>
                </Grid>
            </GroupBox>
        </StackPanel>
    </DockPanel>
</Window>
